package com.mnc.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
@Entity
public class UnitTalk implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2919247672592001531L;
	
	//主键id
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private int talkId;
	//发言内容
	@Column
	@Lob
	private String talkContent;
	//发言时间
	@Column
	private Date talkDate;
	//发言是否合格
	@Column
	private boolean talkView=true;
	//发言人
	@ManyToOne(cascade=CascadeType.REFRESH)
	private User talker;
	//关联团
	@ManyToOne(cascade=CascadeType.REFRESH,fetch=FetchType.LAZY)
	private UserUnit onUnit;
	
	public int getTalkId() {
		return talkId;
	}
	public void setTalkId(int talkId) {
		this.talkId = talkId;
	}
	public String getTalkContent() {
		return talkContent;
	}
	public void setTalkContent(String talkContent) {
		this.talkContent = talkContent;
	}
	public Date getTalkDate() {
		return talkDate;
	}
	public void setTalkDate(Date talkDate) {
		this.talkDate = talkDate;
	}
	public User getTalker() {
		return talker;
	}
	public void setTalker(User talker) {
		this.talker = talker;
	}
	public UserUnit getOnUnit() {
		return onUnit;
	}
	public void setOnUnit(UserUnit onUnit) {
		this.onUnit = onUnit;
	}
	public boolean isTalkView() {
		return talkView;
	}
	public void setTalkView(boolean talkView) {
		this.talkView = talkView;
	} 
	
}
